import plugin from '../../lib/plugins/plugin.js'
import { segment } from "oicq";
const ji = {
  "鸡": "j",
  "你": "n",
  "太": "t",
  "美": "m",
  "唱": "唱",
  "跳": "跳",
  "rap": "rp",
  "篮球": "lq",
  "music": "mck",
  "笑死": "xs",
  "哇呵呵": "哇呵呵",
  "喜欢": "喜欢",
  "制作人": "qm",
  "大家好": "djh",
  "我是": "ws",
  "鲲鲲": "鲲鲲",
  "你干嘛": "ngm",
  "哈哈": "hh",
  "哎呦": "ay",
  "你好烦": "nhf",
  "开始吟唱": "jntm",
  "你干嘛哈哈哟": "ngmhhy",
  "哟哈哈嘛干你": "yhhmgn",
  "二手鸡": "esj",
  "rap鸡": "rup",
  "DJ鸡": "djj",
  "谢谢鸡": "xxj",
  "惊魂鸡": "jhj",
  "仙剑鸡": "xjj",
  "新年鸡": "xnj",
  "战斗鸡": "zdj",
  "桃花鸡": "thj",
  "某人鸡": "mrj",
  "江南鸡": "jnj",
  "尖叫鸡": "jjj",
  "baby鸡": "bbj",
  "欢喜鸡": "hxj",
  "耶耶鸡": "yyj",
  "鸡太美": "jtm",
}
const jireg = new RegExp(`^(${Object.keys(ji).join("|")})$`)
export class example extends plugin {
  constructor() {
    super({
      name: '鸡音盒',
      event: 'message',
      priority: 5000,
      rule: [
        {
          reg: jireg,
          fnc: 'jiji'
        },
        {
          reg: "^鸡音盒$",
          fnc: 'help'
        }
      ]

    })
  }


  async jiji(e) {
    e.reply(segment.record(`http://jilehe.125ks.cn/Voice/jlh/res/${encodeURIComponent(ji[e.msg])}.mp3`))
  }
  async help(e) {
    e.reply(Object.keys(ji).join("，"))
  }
}

